package com.xbongbong.saas.constant;

import com.xbongbong.paas.constant.PaasConstant;
import com.xbongbong.saas.enums.XbbRefTypeEnum;
import com.xbongbong.saas.enums.business.ClueEnum;
import com.xbongbong.saas.enums.business.CustomerManagementEnum;
import com.xbongbong.saas.enums.business.ProductEnum;
import lombok.Getter;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author 吴峰
 * @version v1.0
 * @date 2020/3/31 19:13
 * @since v1.0
 */
@Getter
public class SaasFieldConstant {

    /**
     * 搜索其他数据的时候，需要检索的数据
     */

    public Map<Integer, List<String>> fieldMap = new HashMap<>(PaasConstant.DEFAULT_INITIAL_CAPACITY);


    public SaasFieldConstant()  {
        fieldMap.put(XbbRefTypeEnum.CUSTOMER_MANAGEMENT.getCode(), Arrays.asList(CustomerManagementEnum.CREATOR.getAttr(), CustomerManagementEnum.PHONE.getAttr()));
        fieldMap.put(XbbRefTypeEnum.CLUE.getCode(), Arrays.asList(ClueEnum.PHONE.getAttr()));
        fieldMap.put(XbbRefTypeEnum.PRODUCT.getCode(), Arrays.asList(ProductEnum.PRICE.getAttr(), ProductEnum.COST.getAttr(), ProductEnum.SPECIFICATION.getAttr(), ProductEnum.SUPPLIER.getAttr(), ProductEnum.STOCK.getAttr(), ProductEnum.BARCODE.getAttr()));
    }
}
